<!--
*Author：COCO
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/quality/bom/Bom.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/quality/bom/Bom.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'BomId',
                footer: "Foots",
                cnName: 'BOM表',
                name: 'bom/Bom',
                url: "/Bom/",
                sortName: "create_time"
            });
            const editFormFields = ref({"Product_Code":"","BomCode":"","Model":"","Product_name":"","Operator":"","Size":"","Bom_version":"","Create_time":""});
            const editFormOptions = ref([[{"title":"成品编号","required":true,"field":"Product_Code"},
                               {"title":"Bom编号","required":true,"field":"BomCode"}],
                              [{"title":"规格型号","required":true,"field":"Model"},
                               {"title":"成品名称","required":true,"field":"Product_name"}],
                              [{"title":"操作人","required":true,"field":"Operator"},
                               {"title":"尺寸","required":true,"field":"Size"}],
                              [{"title":"BOM版本号","required":true,"field":"Bom_version"},
                               {"title":"创建时间","required":true,"field":"Create_time","type":"datetime"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'Bom_version',title:'BOM版本号',type:'string',width:110,require:true,align:'left',sort:true},
                       {field:'Operator',title:'操作人',type:'string',width:120,require:true,align:'left'},
                       {field:'Size',title:'尺寸',type:'string',width:120,require:true,align:'left'},
                       {field:'Model',title:'规格型号',type:'string',width:110,require:true,align:'left'},
                       {field:'Product_name',title:'成品名称',type:'string',width:110,require:true,align:'left'},
                       {field:'Product_Code',title:'成品编号',type:'string',width:110,require:true,align:'left'},
                       {field:'BomCode',title:'Bom编号',type:'string',width:110,require:true,align:'left'},
                       {field:'Create_time',title:'创建时间',type:'datetime',width:150,require:true,align:'left',sort:true},
                       {field:'BomId',title:'Bom主键Id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
